fix late setting of dnd icons
authorMatthias Clasen <matthiasc@src.gnome.org>
Thu, 27 Apr 2006 05:16:43 +0000 (05:16 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 27 Apr 2006 05:16:43 +0000 (05:16 +0000)
ChangeLog
ChangeLog.pre-2-10
gtk/gtkdnd.c

index 6f23773064110ba104b3a88d0ca556332822eb25..b2dec1990913ef7fe0b6e5d8421b7b13e276f4a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-04-27  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkdnd.c (gtk_drag_set_icon_window): Handle the case
+       of being called after the drag is cancelled.  (#339224, 
+       Benjamin Otte)
+
        * gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
        Use XFixes only if it is available.  (#339839, Marko Anastasov)
 
index 6f23773064110ba104b3a88d0ca556332822eb25..b2dec1990913ef7fe0b6e5d8421b7b13e276f4a9 100644 (file)
@@ -1,5 +1,9 @@
 2006-04-27  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkdnd.c (gtk_drag_set_icon_window): Handle the case
+       of being called after the drag is cancelled.  (#339224, 
+       Benjamin Otte)
+
        * gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
        Use XFixes only if it is available.  (#339839, Marko Anastasov)
 
index 8c2d2abc7666816a2db4c8453d79cc12abd7826b..0e11b9d767171bcf3c011f17cd51eadd5ad03e87 100644 (file)
@@ -2849,6 +2849,13 @@ gtk_drag_set_icon_window (GdkDragContext *context,
   GtkDragSourceInfo *info;
 
   info = gtk_drag_get_source_info (context, FALSE);
+  if (info == NULL)
+    {
+      if (destroy_on_release)
+       gtk_widget_destroy (widget);
+      return;
+    }
+
   gtk_drag_remove_icon (info);
 
   if (widget)